﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Configuration;

namespace Mytrip.Theme
{
    public static class ThemeSetting
    {
        public static string defaultTheme = ConfigurationManager.AppSettings["defaultTheme"];
        public static string allTheme = ConfigurationManager.AppSettings["allTheme"];
        public static bool unlockTheme = bool.Parse(ConfigurationManager.AppSettings["unlockTheme"]);
        public static string[] allThemeMassive = allTheme.Split(',');
        public static string brouser = HttpContext.Current.Request.Browser.Browser;
        public static int majorversion = HttpContext.Current.Request.Browser.MajorVersion;
        public static double minorversion = HttpContext.Current.Request.Browser.MinorVersion;
        public static string version = HttpContext.Current.Request.Browser.Version;
        public static string theme()
        {
            if (HttpContext.Current.Session["theme"] == null)
                HttpContext.Current.Session["theme"] = ThemeSetting.defaultTheme;
            return HttpContext.Current.Session["theme"].ToString();
        }
    }
}